<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>css学习</title>
    <style>
        #p2 {
            color: purple;
        }
        #p3 {
            color: darksalmon;
        }
        .red {
            color: red;
        }
        .green {
            color: green;
        }
    </style>
</head>
<body>
    <div class="red">div111</div>
    <div class="green">div222</div>
    <div>div333</div>
    <p class="red">p111</p>
    <p id="p2" class="green">p222</p>
    <p id="p3">p333</p>
</body>
</html>